<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="user">
    <!-- The user image in the navbar-->
    {{#if isSignin}}
    <img src="public/images/user2-160x160.jpg" class="user-image" alt="User Image">
    <span class="hidden-xs">你好，{{username}}</span>
    {{else}}
    <!-- hidden-xs hides the username on small devices so only the image appears. -->
    <span class="hidden-xs" id="user-signin">登录</span>
    <span class="hidden-xs" id="user-signup">注册</span>
    {{/if}}
  </a>
  <ul class="dropdown-menu">
    <!-- The user image in the menu -->
    {{#if isSignin}}
    <li class="user-header">
      <img src="public/images/user2-160x160.jpg" class="img-circle" alt="User Image">
      <p>
        Alexander Pierce - Web Developer
        <small>{{username}}</small>
      </p>
    </li>
    <!-- Menu Body -->
    {{else}}
    <div class="box box-info">
      <div class="box-header with-border">
        <h3 class="box-title"></h3>
      </div>
      <!-- /.box-header -->
      <!-- form start -->
      <form class="form-horizontal" id="user-form">
        <div class="box-body">
          <div class="form-group">
            <label for="username" class="col-sm-3 control-label">账号：</label>
            <div class="col-sm-9">
              <input type="text" class="form-control" name="username" id="username" placeholder="请输入账号...">
            </div>
          </div>
          <div class="form-group">
            <label for="password" class="col-sm-3 control-label">密码：</label>
            <div class="col-sm-9">
              <input type="password" class="form-control" name="password" id="password" placeholder="请输入密码...">
            </div>
          </div>
        </div>
      </form>
    </div>
    {{/if}}
    
    <!-- Menu Footer-->
    {{#if isSignin}}
    <li class="user-footer">
      <div class="pull-left">
        <a href="#" class="btn btn-primary btn-flat" id="signout">注销</a>
      </div>
      <div class="pull-right">
        <a href="javascript:void(0)" class="btn btn-default btn-flat">取消</a>
      </div>
    </li>
    {{else}}
    <li class="user-footer">
      <div class="pull-left">
        <a href="#" class="btn btn-primary btn-flat" id="confirm">确定</a>
      </div>
      <div class="pull-right">
        <a href="javascript:void(0)" class="btn btn-default btn-flat">取消</a>
      </div>
    </li>
    {{/if}}
  </ul>